package com.xinxin.o2o.enums;

/**
 * @author 史鑫鑫
 * @date 2019-08-20 11:15
 */
public enum GlobalCode {
    /**
     * 全局错误码
     */
    SUCCESS(200, "成功"),
    RUN_TIME_EXCEPTION(201, "运行时异常"),
    UNKNOWN_EXCEPTION(202, "未知异常"),
    PARAM_IS_EMPTY(3001, "参数为空"),
    PARAM_ERROR(3002, "参数异常"),
    INNER_ERROR(4000, "内部错误"),
    DELETE_ERROR(5000, "删除操作失败"),
    DELETE_PRODUCT_CATEGORY_ERROR(5001, "删除产品分类失败");


    private int code;
    private String msg;

    GlobalCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
